#!/bin/bash

#Allow packages required by this app to be uninstalled
if [ "$(get_codename)" == bookworm ];then
  purge_packages || exit 1
  remove_repofile_if_unused /etc/apt/sources.list.d/bookworm-backports.list
elif [ "$(get_codename)" == bullseye ];then
  purge_packages || exit 1
  remove_repofile_if_unused /etc/apt/sources.list.d/bullseye-backports.list
elif [ $arch == 64 ]; then
  flatpak_uninstall org.kicad.KiCad || exit 1
  purge_packages || exit 1
else
  purge_packages || exit 1
fi
